package com.example.novelstory.service.dxy;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.novelstory.dao.dxy.VipDao;
import com.example.novelstory.entity.VipUser;
import java.util.List;
import org.springframework.stereotype.Service;

@Service
public class VipServicelmpl extends ServiceImpl<VipDao,VipUser> {
//    @Autowired
//    VipDao vipDao;
//
//    @Override
    public List<VipUser> findVipAll() {
//        List<VipUser> all = vipDao.findVipAll();
        return list();
    }

//    @Override
    public Boolean addVipInfo(VipUser vipUser)
    {
//        int addVipInfo = vipDao.addVipInfo(username, password, email, sex, introduce, province,city,country,headimgurl,status,login,login_ip,login_time,exp,intrgral,create_time,update_time,recommend,viplevel,recharge);
//        if (addVipInfo == 1) {
//            List<VipUser> all = vipDao.findVipAll();
//            return all;
//        } else {
            return save(vipUser);

        }

//    }

//    @Override
    public Boolean deleteVipInfo(int id) {
//        int userVipInfo = vipDao.deleteVipInfo(id);
//        if (userVipInfo == 1) {
//            List<VipUser> all = vipDao.findVipAll();
//            return all;
//        } else {
            return removeById(id);

        }
//    }

//    @Override
    public Boolean updeteVipInfo(VipUser vipUser)
 {
//        int updeteVipInfo = vipDao.updeteVipInfo(username, password, email, sex, introduce, province,city,country,headimgurl,status,login,login_ip,login_time,exp,intrgral,create_time,update_time,recommend,viplevel,recharge);
//        if (updeteVipInfo == 1) {
//            List<VipUser> all = vipDao.findVipAll();
//            return all;
//        } else {
            return updateById(vipUser);

        }

    }
//}
